import request from '@/utils/request'
// 手机 密码 登录
export function login(params) {
    // var param = null
    // if (data.captcha) {
    //     console.log('有验证码');
    //     param = `captcha=${data.captcha}`
    // } else {
    //     console.log('无验证码');
    //     param = `password=${data.password}`
    // }
    return request({
        // url: `/login/cellphone?phone=${data.phone}&${param}`,
        url: "/login/cellphone",
        method: 'get',
        params
    })
}
// 获取验证码
export function getCaptchaSent(params) {
    return request({
        url: "/captcha/sent",
        method: "get",
        params
    })
}
// 获取验证验证码
export function getCaptchaVerify(params) {
    return request({
        url: "/captcha/verify",
        method: "get",
        params
    })
}
// 邮箱登录
export function loginEmail(params) {
    return request({
        url: "/login",
        method: "get",
        params
    })
}